package com.jxtti.utils;

public class DbContextHolder {
	private static final ThreadLocal contextHolder = new ThreadLocal(); // 线程本地环境

	// 设置数据源类型
	public static void setDbType(String dbType) {
		contextHolder.set(dbType);
	}

	// 获取数据源类型
	public static String getDbType() {
		return (String) contextHolder.get();
	}

	// 清除数据源类型
	public static void clearDbType() {
		contextHolder.remove();
	}
}
